﻿

using UnityEngine;

namespace Gameplay
{
    public class Sensor:MonoBehaviour
    {
        [SerializeField] private Transform _groundSensor;
        [SerializeField] private float _groundDistance;
        [SerializeField] private LayerMask _groundMask;

        public bool IsGrounded => Physics.OverlapSphere(transform.position, _groundDistance, _groundMask).Length>0;

       
        private void OnDrawGizmos()
        {
            Gizmos.DrawWireSphere(transform.position, _groundDistance);
        }
    }
}
